using UnityEngine;
using System.Collections;

public class PauseMenu : UIButton {
	private bool isPaused;

	public override void Awake()
	{
		base.Awake();
		isPaused = false;

	}
	public override void ReleaseButton()
	{
		base.ReleaseButton();
		PauseGame();
	}
	
	private void PauseGame()
	{
		if(!isPaused){
			GlobalInfo.gameState = GameStates.Pause;
			isPaused = true;
		}else{
			CameraMovment.Instance.MoveCameraBack();
			GlobalInfo.gameState = GameStates.Play;
			isPaused = false;

		}
	}
}
